
from QCommand import QCommand, CmdIDGen
# send directly
from Cube.command.QCmdInputPipe.QCmdQueue import CmdQueuePush

class QCmdIdle(QCommand):
    CMDID = CmdIDGen()
    CMDNAME = "QCmdIdle"

    def Send(self, CmdBuffer=None):
        if CmdBuffer is None:
            QCommand.InputSend(self, memberID = QCommand.MyMemberID, param = None)
        else:
            CmdQueuePush(CmdBuffer, memberID = QCommand.MyMemberID,
                         cmdID = self.CMDID, param = None)

    def Handle(self, memberID, param):
        QCommand.Handle(self, memberID, param)
        #self.InputSend(0,[])